package Vista;
import java.awt.BorderLayout;

import javabean.JPanelImagen;

import javax.swing.ComboBoxModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class JBienvenida extends javax.swing.JFrame {
	private JPanelImagen pnlImagenBienvenida;
	private JButton btnSalir;
	private JButton btnEmpezar;
	private JComboBox cmbNivel;
	private JLabel lblNivel;
	private JTextField txtUsuario;
	private JLabel lblUsuario;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				JBienvenida inst = new JBienvenida();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public JBienvenida() {
		
		super();
		initGUI();
	}	
		private void initGUI() {
			try {
				setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
				{
		
		{
			pnlImagenBienvenida = new JPanelImagen();
			getContentPane().add(pnlImagenBienvenida, BorderLayout.CENTER);
			pnlImagenBienvenida.setRutaImagen("/imagenes/imagenfondo.png");
			pnlImagenBienvenida.setPreferredSize(new java.awt.Dimension(226, 79));
			
			{
				ComboBoxModel JCmbNivelModel = 
					new DefaultComboBoxModel(
							new String[] { "Basico", "Intermedio", "Avanzado"});
				cmbNivel = new JComboBox();
				pnlImagenBienvenida.add(cmbNivel);
				cmbNivel.setModel(JCmbNivelModel);
				cmbNivel.setBounds(200, 65, 208, 30);
			}
			
			{
				lblUsuario = new JLabel();
				pnlImagenBienvenida.add(lblUsuario);
				lblUsuario.setText("Nombre del Usuario:");
				lblUsuario.setBounds(16, 12, 174, 44);
			}
			{
				txtUsuario = new JTextField();
				pnlImagenBienvenida.add(txtUsuario);
				txtUsuario.setBounds(202, 22, 206, 31);
			}
			{
				lblNivel = new JLabel();
				pnlImagenBienvenida.add(lblNivel);
				lblNivel.setBounds(16, 62, 174, 44);
				lblNivel.setText("Nivel:");
			}
			
			{
				btnEmpezar = new JButton();
				pnlImagenBienvenida.add(btnEmpezar);
				btnEmpezar.setText("Empezar");
				btnEmpezar.setBounds(118, 137, 128, 27);
			}
			{
				btnSalir = new JButton();
				pnlImagenBienvenida.add(btnSalir);
				btnSalir.setText("Salir");
				btnSalir.setBounds(257, 137, 128, 27);
			}
			
		}
		
		
	}
				pack();
				this.setSize(453, 245);
			} catch (Exception e) {
			    //add your error handling code here
				e.printStackTrace();
			}
		}

	}
	
	/*
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				pnlBienvenida = new JPanel();
				getContentPane().add(pnlBienvenida, BorderLayout.CENTER);
				//JPanelBienvenida.setLayout(JPanelBienvenidaLayout);
				pnlBienvenida.setBackground(new java.awt.Color(255,255,255));
				pnlBienvenida.setLayout(null);
				
			}
			pack();
			this.setSize(453, 245);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
*/
